#pragma once
#include "ctrlwnd.h"
#include "EffectProp.h"

using namespace Ware;

class CVectorBlock : public CCtrlWnd
{
	DECLARE_DYNAMIC(CVectorBlock)
public:
	CVectorBlock(void);
	~CVectorBlock(void);		

	void			OnDraw();
	void			SetOffset( const OffsetMap& Offset );
	void			GetOffset( OffsetMap& Offset );

private:
	int32			FindPropIndex( float32 fPos );
	int32			GetSeclectNode( CPoint& point );
	void			DeleteSeclectedNode();

private:

	CPoint			m_ptMouseStart;

	AdvancePropVec	m_vecOffset;
	int32			m_nSeclected;

public:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
public:
	afx_msg void OnPaint();
public:
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
public:
	afx_msg void OnKillFocus(CWnd* pNewWnd);
};
